package com.liujun.spring4.demo.aop.aop.base;

/**
 * @author liujun
 * @version 0.0.1
 * @date 2018/09/17
 */
public class MethodPreformance {

  private String method;

  private long startTime;

  private long endTime;

  public MethodPreformance(String method) {
    this.method = method;
    this.startTime = System.currentTimeMillis();
  }

  public void printPerform() {
    endTime = System.currentTimeMillis();

    long useTime = endTime - startTime;

    System.out.println(method + "花费" + useTime + "毫秒");
  }
}
